<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQiiArticleTypeExhibitionTable extends Migration
{
    /**
     * Schema table name to migrate
     * @var string
     */
    public $set_schema_table = 'qii_article_type_exhibition';

    /**
     * Run the migrations.
     * @table qii_article_type_exhibition
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable($this->set_schema_table)) return;
        Schema::create($this->set_schema_table, function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id')->comment('文章ID');
            $table->string('title')->default('')->comment('文章名称');
            $table->text('linkage_id')->nullable()->default(null)->comment('场馆');
            $table->text('linkage_id2')->nullable()->default(null)->comment('年份');
            $table->string('venuen')->default('')->comment('场馆');
            $table->string('starttime')->default('')->comment('开始时间');
            $table->string('shijiand')->default('')->comment('时间段');
            $table->text('sj')->nullable()->default(null)->comment('时间戳');
            $table->string('endtime')->default('')->comment('结束时间');
            $table->string('sponsor')->default('')->comment('主办单位');
            $table->string('explain')->default('')->comment('展会说明');
            $table->string('statusn')->default('')->comment('展会状态');
            $table->string('contacts')->default('')->comment('联系人');
            $table->string('tel')->default('')->comment('联系电话');
            $table->string('emails')->default('')->comment('Emails');
            $table->string('Email')->default('')->comment('Email');
            $table->string('website')->default('')->comment('展会网址');
            $table->longText('content')->comment('文章内容');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
     public function down()
     {
       Schema::dropIfExists($this->set_schema_table);
     }
}
